home *** CD-ROM | disk | FTP | other *** search
/ Amiga Tools 3 / Amiga Tools 3.iso / guides-texts / amos / amoslist / text0059.txt < prev    next >
Encoding:
Text File  |  1995-09-01  |  1.7 KB  |  44 lines

  1.  
  2. > If you look at my original request, I asked also for colours 32-63 to goto
  3. > colour 0. Without, it looks good, but if anyone can see a way of doing it,
  4. > I'd be very grateful :-). For anyone who's interested, this is what I got:
  5. >   SCRPOS=Leek(Screen Base+4*5)
  6. >   Memory Fill SCRPOS To SCRPOS+(320*160)/8-1,Chr$(255)
  7.  
  8. Assemble these lines into a bank, then call them for each bitplane
  9. with:
  10.  
  11.      Dreg(0)=Num Longwords in a bitplane
  12.      Areg(0)= Address of bitplanes (0-4 on each iteration)
  13.      Areg(1)=Address of bitplane 5    
  14.  
  15. Do this before you fill bitplane 5, and it should convert all colours
  16. 0-31 to 0. Then the fill will convert them all to colour 32, but they
  17. will still be black which is what you wanted.
  18.  
  19.         Bra         skip
  20. loop:        Move.l     0(A0,D0.l),D1
  21.         And.l     0(A1,D0),D1
  22.         Move.l     D1,0(A0,D0.l)
  23. skip:        DBra     D0,loop
  24.                    Rts
  25.  
  26. P.s. This assembler is untested, but it is roughly right. You might
  27. have to split the And into a move and an And if it doesn't take this
  28. addressing mode.
  29. --------------------------------------------------------
  30.  WORK: Eurotherm Controls, Worthing                     
  31.  Email: paul.hickman@controls.eurotherm.co.uk           
  32.                                                         
  33.  UNIVERSITY: Imperial College, London                      
  34.  Email: ph@doc.ic.ac.uk                                 
  35. --------------------------------------------------------
  36. The opinions expressed above to not represent the views of
  37. Eurotherm Controls plc, or Imperial College, or in fact Paul
  38. Hickman, but are in fact the views of a small furry alien from
  39. the planet zorg (called fred), so if you don't like them, sue 
  40. him/her/whatever. Death to all tennis players.
  41.  
  42.